package com.googlecode.contests_repo.core.model;

import org.codehaus.jackson.annotate.JsonIgnore;

/**
 * Represents a resource entity from the system. Provides getters and setters
 * for the corresponding attributes in the json.
 * 
 * @author Svetla Marinova, M23322, joro, petko
 */
public abstract class Resource {
	private String id;
	private String format;
	private String title;
	private String about;
	private String notes;

	/**
	 * Constructs an instance of the resource.
	 */
	public Resource() {
		format = title = about = notes = "";
	}

	/**
	 * Gets the resource identifier.
	 * 
	 * @return the resource id
	 */
	@JsonIgnore
	public String getId() {
		return id;
	}

	/**
	 * Sets the resource identifier.
	 * 
	 * @param id
	 *            the new resource id
	 */
	@JsonIgnore
	public void setId(String id) {
		this.id = id;
	}

	/**
	 * Gets the resource json file format.
	 * 
	 * @return the format
	 */
	public String getFormat() {
		return format;
	}

	/**
	 * Sets the resource json file format.
	 * 
	 * @param format
	 *            the format to set
	 */
	public void setFormat(String format) {
		this.format = format;
	}

	/**
	 * Gets the resource title.
	 * 
	 * @return the title
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * Sets the resource title.
	 * 
	 * @param title
	 *            the title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * Gets the resource about.
	 * 
	 * @return the about
	 */
	public String getAbout() {
		return about;
	}

	/**
	 * Sets the resource about.
	 * 
	 * @param about
	 *            the about to set
	 */
	public void setAbout(String about) {
		this.about = about;
	}

	/**
	 * Gets the resource notes.
	 * 
	 * @return the notes
	 */
	public String getNotes() {
		return notes;
	}

	/**
	 * Sets the resource notes.
	 * 
	 * @param notes
	 *            the notes to set
	 */
	public void setNotes(String notes) {
		this.notes = notes;
	}
}
